<?php
//图表统计类
class ChartService {
	
	private $_data; //数据 table类型
	private $_title;
	//条形图
	public function setData() {
		require 'WheelPlugin.php';
		require 'AmupperPlugin.php';
		$wheel = new WheelService ();
		$amupper = new AmupperService ();
		$w = $wheel->setData ();
		$a = $amupper->setData ();
		$logservice = new LogService ();
		$buy = $logservice->setData ();
		foreach ( $w as $k => $v ) {
			$rs [$k] ['rq'] = $v ['rq'];
			$rs [$k] ['wheel'] = $v ['num'];
			$rs [$k] ['amupper'] = $a [$k] ['num'];
			$rs [$k] ['buy'] = $buy [$k] ['num'];
		}
		if (empty ( $rs )) {
			return;
		}
		krsort ( $rs );
		return $rs;
	}
	//设置标题
	public function setTitle() {
	
	}
}